<script>
    $(function () {
        $("#clear-empresas").select2({
            placeholder: "Empresas",
            allowClear: true
        });
    });
</script>
<!-- Content -->
<div id="content">

    <!-- Content wrapper -->
    <div class="wrapper">

        <!-- Breadcrumbs line -->
        <div class="crumbs">
            <ul id="breadcrumbs" class="breadcrumb"> 
                <li><a href="<?= base_url('xpanel') ?>">XPANEL</a></li>
                <li class="active"><a href="<?= base_url() ?>" title="">Inicio</a></li>
            </ul>

        </div>
        <!-- /breadcrumbs line -->

        <!-- Page header -->
        <div class="page-header">
            <div class="page-title">
                <h5>XPANEL</h5>
            </div>

        </div>
        <!-- /page header -->


        <?= form_open('divisiones/save', 'class="form-horizontal"') ?>
        <fieldset>

            <!-- General form elements -->
            <div class="widget row-fluid">
                <div class="navbar">
                    <div class="navbar-inner">
                        <h6>Alta de Division</h6>
                    </div>
                </div>

                <div class="well">

                    <div class="control-group">
                        <label class="control-label">Empresa:</label>
                        <div class="controls">
                            <select name="e_empresa_id" data-placeholder="Seleccione..." id="clear-empresas" tabindex="2" required>
                                <option value=""></option> 
                                <?php foreach ($empresa as $e) { ?>
                                    <option value="<?= $e->e_empresa_id ?>"><?= $e->e_nombre ?></option> 
                                <?php } ?>
                            </select>
                        </div>             
                    </div>

                    <div class="control-group">
                        <label class="control-label">Nombre de la Division:</label>
                        <div class="controls"><input class="span12" type="text" name="d_nombre" placeholder="Nombre" required /></div>
                    </div>

                    <div class="control-group">
                        <button type="submit" class="btn btn-primary">Submit</button>
                    </div>
                </div>
            </div>
            <!-- /general form elements -->

        </fieldset> 

        <?= form_close() ?>
        <!-- /basic inputs -->



    </div>
    <!-- /content wrapper -->

</div>
<!-- /content -->

